/* device */
<template xlang="wxml">
  <van-tabs
    :active="active "
    custom-class="van-tabs"
    :sticky="true"
    :offset-top="0"
    color="#1989fa"
  >
    <van-tab title="设备列表" tab-class="van-tab">
      <bar></bar>
      <View>
        <MySelect></MySelect>
        <MyStatus></MyStatus>
      </View>
      <View class="content">
        <Item v-for="(item,index) in list" :key="index" :data="item" @touchstart="navClick"></Item>
      </View>
    </van-tab>
    <van-tab title="设备地图">
      <bar></bar>
      <!-- <MyMap></MyMap> -->
    </van-tab>
  </van-tabs>
</template>

<script>
import bar from "@/components/bar.vue";
import MySelect from "./components/select.vue";
import MyStatus from "./components/status.vue";
import Item from "./components/Item.vue";
// import MyMap from "./components/map.vue";
export default {
  components: {
    bar,
    MySelect,
    MyStatus,
    Item,
    // MyMap
  },
  data: () => ({
    active: 0,
    list: [
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      },
      {
        title: "数码城改造",
        name: "TY1",
        num: "00000",
        position: "深圳市龙岗天安数码城"
      }
    ]
  }),
  methods: {
    navClick() {
      console.log("anClick");
    }
  },
  computed: {},
  watch: {}
};
</script>

<style lang="less" scoped>
.content {
  background: rgba(0, 0, 0, 0.05);
  height: 100%;
}
</style>